home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / NET / NETC22 / NETC22.DEI < prev    next >
Encoding:
Text File  |  1995-10-13  |  6.9 KB  |  195 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     netc22.dei - Windows 95  -installation script for SQL*Net.
  5.  
  6.   DESCRIPTION
  7.     This script removes the Windows 95 SQL*Net files and un-registers the
  8.     product.
  9.  
  10.   OWNER
  11.     Etna Flores
  12.  
  13.   MODIFIED    DD-MMM-YY Reason
  14.  
  15. *****************************************************************************/
  16. {
  17.   /* Check Product Dependencies */
  18.  { doit = execute("%installer_home%\win95.dei"); }
  19.    [
  20.     'UNBOUND_VARIABLE: signal('failure,instantiate(nls("instver_too_early2",
  21. "The version of the Installer currently running is %%installer_version%%. The
  22. product(s) you have chosen to deinstall were installed with a later version of
  23. the Installer. Please use a later version of the Installer to deinstall these
  24. product(s).")));
  25.   ]
  26.  
  27.  
  28.  if (doit)
  29.    {
  30.  
  31.     net2_deinstall_registry = nls("net2_deinstall_registry","Unregistering %%registry_label%%...");
  32.  
  33.     net2_deinstall_message = nls("net2_deinstall_message","Deinstalling %%registry_label%% Message Files...");
  34.  
  35.     net2_deinstall_dll = nls("net2_deinstall_dll","Deinstalling %%registry_label%% DLL's...");
  36.  
  37.  
  38.     net2_deinstall_script = nls("net2_deinstall_script","Deinstalling %%registry_label%% Installation Scripts...");
  39.  
  40.  
  41.     net2_deinstall_sample = nls("net2_deinstall_sample","Deinstalling %%registry_label%% Sample Files...");
  42.  
  43.     net2_deinstall_easycfg = nls("net2_deinstall_easycfg","Deinstalling SQL*Net Easy Configuration Files...");
  44.  
  45.     chkdeinst_prompt = nls("chkdeinst_prompt", "You may have Oracle Names Server and/or SQL*Net Server installed. Removing %%registry_label%% Client software will disable those products. If you continue to deinstall %%registry_label%%, you should also deinstall Oracle Names Server and SQL*Net Server.");
  46.  
  47.     netc22_deinst = instantiate(nls("netc22_deinst", "A %%registry_label%% DLL (NTNT.DLL) is being used on this machine. Please stop all Oracle applications that are using %%registry_label%% before deinstalling %%registry_label%%.
  48.  
  49. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  50.  
  51. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  52.  
  53. "));
  54.     netc22_deinst_term = instantiate(nls("netc22_inst_term", "%%registry_label%% deinstallation terminated."));
  55.     netc22_deinst_content = instantiate(nls("netc22_deinst_content", "%%registry_label%% DLL Used"));
  56.     netc22_deinst_help = instantiate(nls("netc22_deinst_help", "The Oracle Installer has detected that a %%registry_label%% DLL (NTNT.DLL) is being used on this machine.  Please stop all Oracle applications that are using %%registry_label%% before deinstalling %%registry_label%%.
  57.  
  58. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  59.  
  60. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  61.  
  62. "));
  63.  
  64.   yes_ans = nls("yes_ans","Yes");
  65.   no_ans = nls("no_ans","No");  
  66.   yes_no_list = list(yes_ans, no_ans);
  67.  
  68.   ezcfg = nls("ezcfg","SQL*Net configuration files");
  69.  
  70.   deinstall_easycfg_prompt = nls("deinstall_easycfg_prompt","%registry_label% will now be deinstalled.
  71.  
  72. Do you also wish to deinstall SQL*Net configuration files?
  73. ");
  74.   deinstall_easycfg_label = nls("deinstall_easycfg_label","Deinstall SQL*Net Configuration Files?");
  75.   deinstall_easycfg_help = nls("deinstall_easycfg_help","The Oracle Installer detects SQL*Net configuration files on this machine. Do you wish to deinstall SQL*Net configuration files? 
  76.  
  77. YES deinstalls %registry_label% and SQL*Net configuration files.
  78.  
  79. NO deinstalls %registry_label% but keeps SQL*Net configuration files.
  80.  
  81. CANCEL terminates the deinstallation of %registry_label%.");
  82.  
  83.     done = FALSE;
  84.     while(not(done))
  85.     { move_file("%ORACLE_HOME%\bin\ntnt.dll", "%ORACLE_HOME%\bin\ntnt.dll"); done = TRUE;}
  86.     [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  87.       {
  88.         information_dialog(instantiate(netc22_deinst), netc22_deinst_content, instantiate(netc22_deinst_help));
  89.       }
  90.       'FILE_NOT_FOUND:
  91.         done = TRUE;
  92.     ]                       
  93.   
  94.     ui_product(registry_label);
  95.  
  96.  ans = single_selection_dialog(deinstall_easycfg_prompt, yes_no_list, no_ans, deinstall_easycfg_label, deinstall_easycfg_help);
  97.  
  98.  if (ans == yes_ans)
  99.    deinstall_easycfg = TRUE;
  100.  else
  101.    deinstall_easycfg = FALSE;
  102.  
  103.     /* deinstall "parent" product */
  104.     if (registered("w95netsrv22"))
  105.     {
  106.       parent_product = registration("w95netsrv22");
  107.       unreference(parent_product, parent_product);
  108.       deinstall(parent_product);
  109.     }
  110.      /* Deinstall Dependent Products */
  111.     if (registered("w95tcp22"))
  112.         {
  113.       dependent = registration("w95tcp22");
  114.       unreference(dependent, dependent);
  115.       deinstall(dependent);
  116.     }
  117.  
  118.     if (registered("w95spx22"))
  119.         {
  120.       dependent = registration("w95spx22");
  121.       unreference(dependent, dependent);
  122.       deinstall(dependent);
  123.     }
  124.  
  125.     if (registered("w95nmp22"))
  126.         {
  127.       dependent = registration("w95nmp22");
  128.       unreference(dependent, dependent);
  129.       deinstall(dependent);
  130.     }
  131.     
  132.     
  133.   if (deinstall_easycfg)
  134.   {
  135.  
  136.     if (exists("%oracle_home%\network\cfg\sqlnetv2.cfg"))
  137.     {
  138.       remove_file("%oracle_home%\network\admin\tnsnames.ora");
  139.       remove_file("%oracle_home%\network\admin\sqlnet.ora");
  140.     }
  141.     ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'OS_ERROR: continue();]
  142.     {
  143.     remove_file("%oracle_home%\network\admin\tnsnames.old");
  144.     }
  145.     ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'OS_ERROR: continue();]
  146.     {
  147.     remove_file("%oracle_home%\network\cfg\sqlnetv2.cfg");
  148.     }
  149.     ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'OS_ERROR: continue();]
  150.     {
  151.     remove_file("%oracle_home%\network\cfg\sqlnetv2.old");
  152.     }
  153.     ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'OS_ERROR: continue();]
  154.  
  155.     {
  156.     remove_file("%oracle_home%\network\admin\sqlnetv2.ora");
  157.     }
  158.     ['INVALID_FILE_NAME, 'PERMISSION_DENIED, 'WRITE_ERROR, 'OS_ERROR: continue();]
  159.  
  160.     ui_action(instantiate(net2_deinstall_easycfg));
  161.     remove(cfg22);
  162.  
  163.   }
  164.   else
  165.   {
  166.     remove(cfg22, "exe");
  167.   }
  168.     ui_action(instantiate(net2_deinstall_sample));
  169.     remove(sample);
  170.  
  171.     ui_action(instantiate(net2_deinstall_dll));
  172.     remove(dll);
  173.     remove(exec);
  174.  
  175.     ui_action(instantiate(net2_deinstall_message));
  176.     remove(msb);
  177.  
  178.     /* remove NET20 here in the registry */
  179.     modify("NET20","", ora_config, (registry_filename(current_registry)));
  180.  
  181.     if (registered("w95rsf72"))
  182.         {
  183.       dependent = registration("w95rsf72");
  184.       unreference(dependent, current_registry);
  185.       deinstall(dependent);
  186.     }
  187.  
  188.     ui_action(instantiate(net2_deinstall_script));
  189.     remove(deinstl);
  190.  
  191.     ui_action(instantiate(net2_deinstall_registry));
  192.     unregister(current_registry);
  193.   }
  194. }
  195.